#include<iostream>
using namespace std;

int main()
{
	int arr[9] = {2,4,0,5,7,1,3,8,9};
	for (int i = 1; i <= 8; i++)
	{
		for (int i = 0; i < 9; i++)
		{


			if (arr[i] > arr[i + 1])
			{
				if (i == 8)
					break;
				int temp = arr[i];
				arr[i] = arr[i + 1];
				arr[i + 1] = temp;
			}


		}
	}

	for (int i = 0; i < 9; i++)
	{
		cout << arr[i] << endl;
	}

	system("pause");
	return 0;
}